<template>
  <div>
    <el-card>


        <div>
          <el-table :data="listData" style="width:100%; height:300px;">
            <el-table-column
                v-for="(column, index) in elderlyShorNumber"
                :label="column.label"
                :key="index"
                :prop="column.props"
                :fixed="column.fixed || null"
                :formatter="column.formatter"
            ></el-table-column>
          </el-table>
        </div>


    </el-card>


  </div>
</template>

<script setup>
import analyzeData from "../../apis/anlyze.js"; // 修正拼写错误
import elderlyShorNumber from "../../utils/elderlyShorNumber.js";
import { ref, onMounted } from "vue";
import { Vue3SeamlessScroll } from "vue3-seamless-scroll"; // 引入组件

// 存储数据
const listData = ref([]);
const fetchData = async () => {
  try {
    listData.value = await analyzeData.getElderlyNumber();
    console.log(listData.value);
  } catch (error) {
    console.log(error);
  }
};

onMounted(() => {
  fetchData();
});
//存储

</script>

<style scoped lang="less">
/* 可选：自定义滚动条样式 */

</style>